package dao;
//3
import model.Classes;

import java.util.Scanner;

public class Demo_InsertClass {

    public static void main(String[] args) {
        System.out.println("请输入要添加的班级名：");
        Scanner scanner=new Scanner(System.in);
        String name=scanner.next();
        //封装班级对象
        Classes classes=new Classes();
        classes.setName(name);
        //调用DAO
        ClassDao classDao=new ClassDao();
        int row=classDao.insert(classes);
        if(row==1){
            System.out.println("调用成功");
        }else{
            System.out.println("调用失败");
        }
    }
}
